package com.example.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.stereotype.Service;

import com.example.config.MySource;

@Service
public class SenderService {
	@Autowired
	private MySource source;

	public void send(String msg) throws Exception {
		source.output().send(MessageBuilder.withPayload(msg).build());
	}
}
